package com.cloud.code.真题;

public class Demo31 {

    public static void main(String[] args) {

        String str = "1";
        for (int i = 0; i < 6; i++) {
            char[] chars = str.toCharArray();
            String tem = "";
            int k = 1;
            Character cur = chars[0];
            for (int j = 1; j < chars.length; j++) {

                if(chars[j] != cur){
                    tem = tem+k+cur;
                    cur = chars[j];
                    k=1;
                }else {
                    k++;
                }
            }
            str = tem+k+cur;
        }

        System.out.println(str);
    }
}
